<template>
	<view class="container">
		<view class="service-wrapper">
			<view class="title">问题描述</view>
			<u-input v-model="value" type="textarea"  :height="300"  />
		</view>
		<view class="common-btn submit-btn" @tap="submitMsg">提交留言</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				value:""
			};
		},
		methods:{
			async submitMsg(){
				try{
					await this.$u.api.serviceMsgApi({
						content:this.value
					})
					uni.showToast({
						icon:"success",
						title:"提交成功"
					})
					setTimeout(()=>{
						this.$Router.back()
					},1000)
				}catch(e){
					//TODO handle the exception
				}
			}
		}
	}
</script>

<style lang="scss">
.container{
	background-color: #fff;
	.service-wrapper{
		padding: 40rpx 30rpx;
		
		.title{
			font-size: 28rpx;
			color: #333;
		}
	}
	.submit-btn{
		margin: 0 30rpx;
	}
}
</style>
